#ifndef __SGL_H__
#define __SGL_H__


#include "string.h"
#include "core/sgl_core.h"
#include "fonts/sgl_font.h"
#include "widget/sgl_button.h"
#include "widget/sgl_label.h"
#include "widget/sgl_switch.h"
#include "widget/sgl_battery.h"
#include "widget/sgl_checkbox.h"
#include "widget/sgl_radiobtn.h"
#include "widget/sgl_number.h"
#include "widget/sgl_pgsbar.h"


#define rgb(r,g,b)  sgl_rgb2color(r,g,b)

#if (SGL_CONFIG_PANEL_PIXEL_DEPTH == 32 || SGL_CONFIG_PANEL_PIXEL_DEPTH == 24)
#define SGL_RED              sgl_int2color(0xFF0000)
#define SGL_GREEN            sgl_int2color(0x00FF00)
#define SGL_BLUE             sgl_int2color(0x0000FF)
#define SGL_WHITE            sgl_int2color(0xFFFFFF)
#define SGL_BLACK            sgl_int2color(0x000000)

#elif (SGL_CONFIG_PANEL_PIXEL_DEPTH == 16)
#define SGL_RED              sgl_int2color(0xF800)
#define SGL_GREEN            sgl_int2color(0x07E0)
#define SGL_BLUE             sgl_int2color(0x001F)
#define SGL_WHITE            sgl_int2color(0xFFFF)
#define SGL_BLACK            sgl_int2color(0x0000)

#else
//add other bit pixel
#endif

void sgl_disp_area(int16_t x1, int16_t y1, int16_t x2, int16_t y2, const sgl_color_t *src);

#endif //__SGL_H__
